
 <script>
 $(document).ready(function(){
	 	generic.validaForm();
	     generic.comboCapClon();
        
     $("#iframeContent").load(function(){
	    	var myDiv = this.contentWindow.document.getElementsByTagName('div');
	    	if(myDiv.length>0){
	    	var idDiv = myDiv[0].getAttribute('id');
	    	
	    	var addClase = "";
	    	
	    	if(idDiv == 'asd'){
	    		addClase = "alert alert-danger";
	    	}else{
	    		addClase = "alert alert-success";
	    		generic.limpiaInputs();
	    		$('#txtContenido').val('');
	    		$('#esRequ').attr('checked',false)
	    		generic.comboCapClon();
	    	}
			textError = $(myDiv[0]).html();
			(textError!='')?function(){
	       	 	$('#contentFrame').html(textError).addClass(addClase).css("height", '48px');	
	       }()
	       :function(){
	       	$('#contentFrame').removeClass(addClase).empty().css("height", '0px');;
	       }();
    	}
    	
    });

   });

</script>

<div class="well">
	<div class="container">
	
		<div class="row">
		<div class="col-lg-8"></div>
		<div class="col-lg-4">
		</div>
	</div>
	<iframe id="iframeContent" name ="response" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" width="0" height="0	">
	</iframe>
	<div id="contentFrame">
				
	</div>
        <form name="myForm" id="myForm" action="modules/newUser.php" method="post" class="form-horizontal" role="form" target="response">
			<legend> Registro de Temas</legend>
			
			<div class="form-group">	
			<label for="txtDescripcion" class="control-label col-sm-2">Descripción:</label>
			<div class="col-sm-10">
				<input type="text" class="form-control input-sm" name="txtDescripcion" id="txtDescripcion" placeholder="">
				<span class="help-block">Breve descripción del Tema.</span>
			</div>
		</div>
		
		<hr>
		 <div class="form-group">
		 	<label for="cboCap" class="control-label col-sm-2">Capitulo:</label>
			<div class="col-lg-10">
					<select  class="form-control input-sm" name="cboCap" id="cboCap">
					</select>	
					<input type="hidden" class="form-control input-sm" name="txtCuestionarioCap" id="txtCuestionarioCap" placeholder="">		
			</div>	
		 </div>
		 <hr>
		  
		 <hr>
		<div class="form-group">
		 	<label for="txtIContenido" class="control-label col-sm-2">Contenido:</label>
			<div class="col-lg-10">
				<textarea class="form-control" rows="2" id="txtContenido" name="txtContenido"></textarea>
          	</div>
		 </div>
		 <hr>
		 <div class="form-group">	
			<label for="txtNumero" class="control-label col-sm-2">Numero:</label>
				<div class="col-sm-1">
				<input type="text" class="form-control input-sm" name="txtNumero" id="txtNumero" placeholder="">				
				</div>
		
			<label for="esRequ" class="control-label col-sm-2">Es Requerido:</label>
			<div class="col-sm-2">
				<div class="checkbox">
				    <label>
				      <input type="checkbox" name="esRequ" id="esRequ"> 
				    </label>
		  		</div>
			</div>
		</div>
		<hr>
		<div class="col-lg-3 text-left">
			 <button type="submit" name="btnGuardarTema"  class="btn btn-primary">Guardar</button>
			 
			 
		</div>
	
	</form>
	
</div>
		
</div>			
              